<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBistroIncomeMonthsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('bistro_income_months', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('bistro_id')->comment('店铺Id');
            $table->string('month', 20)->comment('月份');
            $table->string('year', 20)->comment('年');
            $table->decimal('income', 10, 2)->comment('收入');
            $table->decimal('outcome', 10, 2)->comment('优惠金额');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('bistro_income_months');
    }
}
